package com.swathi.test.Java;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.swathi.test.service.UserService;
import com.swathi.test.vo.User;

public class CallingApp {

	public static void main(String[] args) {

		ApplicationContext context = new ClassPathXmlApplicationContext(
				"classpath:com/swathi/test/xml/applicationContext.xml");
		UserService userService = (UserService) context
				.getBean("userServiceImpl");
		List<User> userList = userService.getUsers();
		for (User user : userList) {
			System.out.println(user.getUserId() + "-" + user.getName());
		}
	}
}
